package web.demo.dao;

import java.util.List;

import web.demo.entity.Food;
import web.demo.utils.Condition;
import web.demo.utils.PageBean;

public interface IFoodDao {
	public boolean addFood(Food food);
	public void update(Food food);
	public boolean delete(int id);
	
	/*
	 * 查询操作
	 * */
	//1、查询全部
	public List<Food> getFoodAll(PageBean pageBean);
	public List<Food> getAll();
	public List<Food> getByFoodType(int foodTypeId);
	//2、查询食品的全部数量
	public int getFoodCount();
	public int getFoodCount(PageBean pageBean);
	//3、按照条件分页查询
	public List<Object[]> getAll(PageBean pageBean);
	//4、按条件查询总的数目
	public int getCount(PageBean pageBean);
	//5、通过id查询
	public Food getFoodById(int id);
	//搜索
	public List<Food> select(String str);
}
